#ifndef __win_builder_h__
#define __win_builder_h__

namespace core
{
    class StStyleCache;
    class StWidget;
}

namespace win
{
    class Builder
    {
    public:
        Builder(core::StStyleCache* cache)
            : style_cache_(cache) {}

        ~Builder() {}

        core::StWidget* Parse(const wchar_t* file);
        core::StWidget* ParseText(const wchar_t* text);

    private:
        BOOL BuildHeader(XmlElement* root);
        core::StWidget* BuildBody(XmlElement* root);
        BOOL BuildNode(XmlElement* element);

    private:
        core::StStyleCache* style_cache_;
    };
}

#endif